package com.woniuxy.servicelayer;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.woniuxy.dal.entity.Userinfo;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author rjq51
* @description 针对表【userInfo(用户表)】的数据库操作Service
* @createDate 2023-03-27 17:02:43
*/
public interface UserinfoService extends IService<Userinfo> {


     int modifyImgsURL(String phoneNumber, String photoName);

    Userinfo checkLogin(String phoneNumber, String password);
    int updateUserInfo(Userinfo userinfo);

    Page<Userinfo> selectUserInfo(Integer currentPage, Integer pageSize, String keyword);

    int addUser(Userinfo userinfo);

    int deleteUser(Integer uesrId);

//    int resetPassword(Integer userId, String password);
    String resetPassword(Integer userId);

    int personalize(Integer userId, Integer permission);

    String oldPassword(Integer userId, String password);

    Userinfo selectUserById(Integer userId);

    Userinfo getUserByAccount(String phone);

    Userinfo getThisRole(Integer userId);

    Userinfo phoneNumberToUser(String phoneNumber);

    Integer updateUserNameById(Object userId, String newUserName);

    Integer updateUserPassById(Object userId, String newUserPass);

    Integer updateUserPhoneNumber(String phoneNumber, Integer userId);
}
